import request from '@/utils/request'
const apiUrl = '/payment'

export function getPaymentList(params) {
  return request({
    url: apiUrl,
    method: 'get',
    params
  }).then(res => {
    return res.data
  })
}

export function getPaymentInfo(id) {
  return request({
    url: apiUrl + '/' + id,
    method: 'get'
  }).then(res => {
    return res.data
  })
}

export function paymentOrder(data) {
  return request({
    url: apiUrl + '-order',
    method: 'post',
    data
  }).then(res => {
    return res.data
  })
}

export function paymentQuery(payNumber) {
  return request({
    url: apiUrl + '/query/' + payNumber,
    method: 'get'
  }).then(res => {
    return res.data
  })
}

